<?php

namespace common\models\online_verify_tables;

use Yii;

/**
 * This is the model class for table "{{%res_interview}}".
 *
 * @property int $RES_ID
 * @property string $INTERVIEW_TYPE 1:
 * @property int $USER_ID
 * @property string $INTERVIEW_RESULT 0:δͨ
 * @property string $BUSINESS_ID
 * @property string $CAR_PRICE
 * @property string $CAR_TYPE
 * @property string $LOAN_AMT
 * @property string $LOAN_PERIODS
 * @property string $CUSTOMER_NAME
 * @property string $CUSTOMER_ID
 * @property string $ID_PHOTE_ADDR
 * @property string $BIRTHDAY
 * @property string $CUSTOMER_SEX
 * @property string $BRANCH_CODE
 * @property string $BRANCH_NAME
 * @property string $OCR_RATE
 * @property string $LOCATION
 * @property string $INTERVIEW_DATE
 * @property string $FILE_NAME
 * @property string $LOCKS
 * @property int $LOCKS_USER
 * @property string $USER_NAME
 * @property string $REMARK
 * @property string $CREATE_TIME
 * @property string $DEVICE_MODEL
 * @property string $LOCKS_USERNAME
 */
class ResInterview extends \yii\db\ActiveRecord
{
    /**
     * {@inheritdoc}
     */
    public static function tableName()
    {
        return '{{%res_interview}}';
    }

    /**
     * @return \yii\db\Connection the database connection used by this AR class.
     */
    public static function getDb()
    {
        return Yii::$app->get('db_online_verify');
    }

    /**
     * {@inheritdoc}
     */
    public function rules()
    {
        return [
            [['INTERVIEW_TYPE', 'INTERVIEW_RESULT', 'BUSINESS_ID'], 'required'],
            [['USER_ID', 'LOCKS_USER'], 'integer'],
            [['INTERVIEW_DATE', 'CREATE_TIME'], 'safe'],
            [['INTERVIEW_TYPE', 'INTERVIEW_RESULT'], 'string', 'max' => 1],
            [['BUSINESS_ID', 'CAR_TYPE', 'CUSTOMER_NAME'], 'string', 'max' => 60],
            [['CAR_PRICE', 'LOAN_AMT', 'LOAN_PERIODS', 'CUSTOMER_ID', 'BIRTHDAY', 'CUSTOMER_SEX', 'BRANCH_CODE', 'OCR_RATE'], 'string', 'max' => 30],
            [['ID_PHOTE_ADDR'], 'string', 'max' => 200],
            [['BRANCH_NAME', 'LOCATION'], 'string', 'max' => 100],
            [['FILE_NAME'], 'string', 'max' => 300],
            [['LOCKS'], 'string', 'max' => 2],
            [['USER_NAME', 'DEVICE_MODEL', 'LOCKS_USERNAME'], 'string', 'max' => 64],
            [['REMARK'], 'string', 'max' => 128],
        ];
    }

    /**
     * {@inheritdoc}
     */
    public function attributeLabels()
    {
        return [
            'RES_ID' => Yii::t('app', 'Res  ID'),
            'INTERVIEW_TYPE' => Yii::t('app', '1:'),
            'USER_ID' => Yii::t('app', 'User  ID'),
            'INTERVIEW_RESULT' => Yii::t('app', '0:δͨ'),
            'BUSINESS_ID' => Yii::t('app', 'Business  ID'),
            'CAR_PRICE' => Yii::t('app', 'Car  Price'),
            'CAR_TYPE' => Yii::t('app', 'Car  Type'),
            'LOAN_AMT' => Yii::t('app', 'Loan  Amt'),
            'LOAN_PERIODS' => Yii::t('app', 'Loan  Periods'),
            'CUSTOMER_NAME' => Yii::t('app', 'Customer  Name'),
            'CUSTOMER_ID' => Yii::t('app', 'Customer  ID'),
            'ID_PHOTE_ADDR' => Yii::t('app', 'Id  Phote  Addr'),
            'BIRTHDAY' => Yii::t('app', 'Birthday'),
            'CUSTOMER_SEX' => Yii::t('app', 'Customer  Sex'),
            'BRANCH_CODE' => Yii::t('app', 'Branch  Code'),
            'BRANCH_NAME' => Yii::t('app', 'Branch  Name'),
            'OCR_RATE' => Yii::t('app', 'Ocr  Rate'),
            'LOCATION' => Yii::t('app', 'Location'),
            'INTERVIEW_DATE' => Yii::t('app', 'Interview  Date'),
            'FILE_NAME' => Yii::t('app', 'File  Name'),
            'LOCKS' => Yii::t('app', 'Locks'),
            'LOCKS_USER' => Yii::t('app', 'Locks  User'),
            'USER_NAME' => Yii::t('app', 'User  Name'),
            'REMARK' => Yii::t('app', 'Remark'),
            'CREATE_TIME' => Yii::t('app', 'Create  Time'),
            'DEVICE_MODEL' => Yii::t('app', 'Device  Model'),
            'LOCKS_USERNAME' => Yii::t('app', 'Locks  Username'),
        ];
    }
}
